<template>
  <div class="home-panel">
    <div class="container">
      <div class="head">
        <!-- 标题 -->
        <h3>{{ props.title }}<small>{{ props.subTitle }}</small></h3>
        <!-- 预留的头上左侧插槽 -->
        <slot name="right" />
      </div>
      <!-- 预留的主体内容插槽 -->
      <slot name="content" />
    </div>
  </div>
</template>

<script lang="ts" setup>
const props = defineProps({
  // 主标题
  title: {
    type: String,
    default: ''
  },
  // 副标题
  subTitle: {
    type: String,
    default: ''
  }
})

</script>

<style  lang='less' scoped >
.home-panel {
  background-color: #fff;

  .head {
    display: flex;
    align-items: flex-end;
    padding: 40px 0;

    h3 {
      flex: 1;
      font-size: 32px;
      font-weight: normal;
      margin-left: 6px;
      height: 35px;
      line-height: 35px;

      small {
        font-size: 16px;
        color: #999;
        margin-left: 20px;
      }
    }
  }
}
</style>
